package test.thirteen;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.StringReader;

public class SimpleRead {
	public static BufferedReader input=new BufferedReader(new StringReader("Sir Robin of Camelot\n22 1.61803"));
	public static void main(String[] args) {
		try {
			System.out.println("what's your name");
			String name=input.readLine();
			System.out.println(name);
			System.out.println("How old are you?what's your favourite double?");
			System.out.println("(input:<age><double>)");
			String numbers=input.readLine();
			String[] numArray=numbers.split(" ");
			int age=Integer.parseInt(numArray[0]);
			double favourite=Double.parseDouble(numArray[1]);
			System.out.format("Hi i'm %s. \n", name);
			System.out.format("in 5 years your will be %d  \n", age+5);
			System.out.format("myfavourite double is %f \n", favourite/2);
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
}
